//package com.lianxi.rocketmqmvc.lister;
//
//import com.lianxi.rocketmqmvc.Producer;
//import com.lianxi.rocketmqmvc.RoleConsumer;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//
//import javax.servlet.ServletContextEvent;
//import javax.servlet.ServletContextListener;
//
///**
// * tomcat 监听器,还需在web.xml当中配置
// */
//public class MqListerTest implements ServletContextListener {
//
//    private static Logger logger = LoggerFactory.getLogger(MqListerTest.class);
//
//
//    @Override
//    public void contextInitialized(ServletContextEvent servletContextEvent) {
//        System.out.println(">>>>>>>>>>>>>>>>日志生产者启动了<<<<<<<<<<<<<<<");
//        Producer.startLogProducer();
//        System.out.println(">>>>>>>>>>>>>>>>接口计数生产者启动了<<<<<<<<<<<<<<<");
//        Producer.startCoutProducerProducer();
//        System.out.println(">>>>>>>>>>>>>>>>接口计数消费者启动了<<<<<<<<<<<<<<<");
//        RoleConsumer.startConsumer();
//    }
//
//    @Override
//    public void contextDestroyed(ServletContextEvent servletContextEvent) {
//        System.out.println("清理tomcat");
//    }
//}
